import request from '@/utils/request'

export default {
    addCourse(courseInfoVo) {
        return request({
            url: '/eduservice/course',
            method: 'post',
            data: courseInfoVo
        });
    },
    getCourse(id) {
        return request({
            url: `/eduservice/course/${id}`,
            method: 'get',
        });
    },
    updateCourse(courseInfoVo) {
        return request({
            url: '/eduservice/course',
            method: 'put',
            data: courseInfoVo
        });
    },
    publishCourse(id) {
        return request({
            url: `/eduservice/course/${id}`,
            method: 'put',
        });
    },

    getCoursePublishInfoById(id) {
        return request({
            url: `/eduservice/course/courseInfo/${id}`,
            method: 'get'
        })
    },

    pageQuery(page,limit,queryPage) {
        return request({
            url: `/eduservice/course/${page}/${limit}`,
            method: 'post',
            data:queryPage
        })
    },
    removeCourse(courseId) {
        return request({
            url: `/eduservice/course/${courseId}/`,
            method: 'delete',
        })
    },


}